<template>
  <el-row justify="space-around" style="margin-top: 20px">
    <VisitsCount title="今日访问次数" :num="todaySum" />
    <VisitsCount title="累计访问次数" :num="accumulateSum" />
  </el-row>
</template>
<script setup>
import VisitsCount from '@/components/VisitsCount';
import { getVisitNum } from '@/api/riskZonation'

const todaySum = ref(0)
const accumulateSum = ref(0)
const visitiNum = () => {
  getVisitNum({ system: 1 }).then(res => {
    todaySum.value = res.data?.todaySum || 0
    // todaySum.value = String(res.data.todaySum).padStart(6, "0");
    accumulateSum.value = res.data?.accumulateSum || 0
  })
}

onMounted(() => {
  visitiNum()
})
</script>